package com.heima.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
//@TableName("tb_sku") // 对应数据库表名
public class Sku {
    @TableId(value = "sku_id", type = IdType.NONE)
    private String skuId;
    
    private String skuName;
    
    private String skuImage;
    
    private Integer price;
    
    private Integer classId;
    
    private Boolean isDiscount;
    
    private String unit;
    
    private String brandName;

    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
